/**
 * Copyright Notice ====================================================
 * This file contains proprietary information of JeeStrap Co.
 * Copying or reproduction without prior written approval is prohibited.
 * Copyright (c) 2014 All rights reserved. =============================
 */
 
package ${packageName}.entity${subModuleName};

import java.math.BigDecimal;
import java.util.Date;
import java.lang.String;
import java.lang.Double;
import java.lang.Integer;
import java.math.BigDecimal;
import javax.xml.soap.Text;
import java.sql.Blob;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;

import com.jeeweb.common.persistence.DataEntity;


/**   
 * @Title: Entity
 * @Description: ${functionName}Entity
 * @author ${classAuthor}
 * @version ${classVersion}
 *
 */
@Entity
@Table(name = "${tableName}")
public class ${className?cap_first}Entity extends DataEntity {
	
	<#list fields as f>
	/**${f.fieldLabel}*/
	private ${f.javaFieldType} ${f.javaFieldName};
	</#list>

	public ${className?cap_first}Entity() {
		super();
	}


	<#list fields as f>
	/**
	 *方法: 取得${f.fieldLabel}
	 *@return: ${f.javaFieldType}  ${f.javaFieldName}
	 */
	 <#if f.primaryKey>
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	//@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seq_${tableName}")
	//@SequenceGenerator(name = "seq_${tableName}", sequenceName = "seq_${tableName}")
	</#if>
	@Column(name ="${f.fieldName}" nullable=<#if f.allowNull>true<#else>false</#if><#if f.maxLength !=0>,length=${f.maxLength?c}</#if>)
	public ${f.javaFieldType} get${f.javaFieldName?cap_first}(){
		return this.${f.javaFieldName};
	}

	/**
	 *方法: 设置${f.fieldLabel}
	 *@param: ${f.javaFieldType}  ${f.javaFieldName}
	 */
	public void set${f.javaFieldName?cap_first}(${f.javaFieldType} ${f.javaFieldName}){
		this.${f.javaFieldName} = ${f.javaFieldName};
	}
	</#list>
}